#ifndef CINGREDIENT_H
#define CINGREDIENT_H

#include <QObject>
#include "cobject.h"

class CIngredient : public CObject
{
    Q_OBJECT
//    Q_ENUMS(Category)
//    Q_PROPERTY(int id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
    Q_PROPERTY(QString description READ description WRITE setDescription NOTIFY descriptionChanged)
    Q_PROPERTY(int categoryId READ categoryId WRITE setCategoryId NOTIFY categoryIdChanged)
    Q_PROPERTY(QString picture READ picture WRITE setPicture NOTIFY pictureChanged)

public:
    explicit CIngredient(QObject *parent = 0);
//    enum Category {
//        Meat,
//        Vegetable,
//        Cereal,
//        Fruit,
//        Mushroom,
//        Seasoning,
//        Legume,
//        Egg,
//        Dairy,
//        FatOil
//    };

//    int id();
//    void setId(int id);

    QString name();
    void setName(QString name);

    QString description();
    void setDescription(QString description);

    int categoryId();
    void setCategoryId(int categoryId);

    QString picture();
    void setPicture(QString picture);

signals:
//    void idChanged();
    void nameChanged();
    void descriptionChanged();
    void categoryIdChanged();
    void pictureChanged();

public slots:

private:
//    int m_id;
    QString m_name;
    QString m_description;
    int m_category_id;
    QString m_picture;
};

#endif // CINGREDIENT_H
